package com.project.service;

import com.project.dao.ExamRecordMapper;
import com.project.entity.ExamRecord;
import com.project.service.base.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Transactional(rollbackFor = Exception.class)
@Service
public class ExamRecordServiceImpl extends BaseService implements ExamRecordService {
    @Autowired
    ExamRecordMapper examRecordMapper;

    @Override
    public void add(ExamRecord examRecord) {
        examRecordMapper.insert(examRecord);
    }

    @Override
    public void modify(ExamRecord examRecord) {
        examRecordMapper.updateByanswerrecordid(examRecord);
    }

    @Override
    public ExamRecord findbyAnswerrecordid(Integer answerrecordid) {
        return examRecordMapper.selectByanswerrecordid(answerrecordid);
    }

    @Override
    public void modifysc(ExamRecord examRecord) {
        examRecordMapper.updateByid(examRecord);
    }
}
